from rest_framework.serializers import ModelSerializer
from myapp.models import NavModel,BannerModel
class NavSerializer(ModelSerializer):
    class Meta:
        model=NavModel
        fields=['id','navname','link','ishttp']

class BannerSerializer(ModelSerializer):
    class Meta:
        model=BannerModel
        fields=['id','title','link','ishttp','imgsrc']